package my.magic.Activity;


import my.magic.Counter.LPZaehler1P;
import my.magic.Counter.LPZaehler2P;
import my.magic.Counter.LPZaehler3P;
import my.magic.Counter.LPZaehler4P;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;


public class LPzaehler extends Parent{
	@Override
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        activityName = "LPZaehler";
        setID();
        buttonAction(this.activityName);
        background.setBackgroundResource(R.drawable.backgroundred);
        buttonLPZaehler.setBackgroundResource(R.drawable.lpzaehlerbutton_leu);
        
        LayoutInflater inflater = getLayoutInflater();
		LinearLayout content= (LinearLayout) inflater.inflate(R.layout.playerchoice, null);
		background.addView(content);
		
		LinearLayout button1p = (LinearLayout) findViewById(R.id.button1player);
		LinearLayout button2p = (LinearLayout) findViewById(R.id.button2player);
		LinearLayout button3p = (LinearLayout) findViewById(R.id.button3player);
		LinearLayout button4p = (LinearLayout) findViewById(R.id.button4player);
		
		button1p.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent myIntent = new Intent(v.getContext(), LPZaehler1P.class);
				startActivity(myIntent);
			}
		});
		button2p.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent myIntent = new Intent(v.getContext(), LPZaehler2P.class);
				startActivity(myIntent);
			}
		});
		button3p.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent myIntent = new Intent(v.getContext(), LPZaehler3P.class);
				startActivity(myIntent);
			}
		});
		button4p.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent myIntent = new Intent(v.getContext(), LPZaehler4P.class);
				startActivity(myIntent);
			}
		});
	}
}
